<div id="page-heading">
	<h1>{$title}</h1>
</div>
<table border="0" cellpadding="0" cellspacing="0" width="95%">
	<tr>
		<td width="60%" rowspan="2" align="center" valign="top">		
			<table border="0" width="90%" cellpadding="0" cellspacing="0" id="product-table">
				<tr>
					<th width="5%" align="center" class="table-header-repeat">#</th>
					<th width="35%" align="left" class="table-header-repeat line-left">Category</th>
					<th width="5%" align="left" class="table-header-repeat line-left">&nbsp;</th>
					<th width="15%" class="table-header-repeat line-left">Parent Id</th>
					<th width="20%" class="table-header-repeat line-left">Status</th>
                                        <th width="20%" class="table-header-repeat line-left">&nbsp;</th>
				</tr>
				{section name=cat_entry loop=$cat_arr}
				<tr>
					<td align="center">{$cat_arr[cat_entry].cat_id}</td>
					<td><div id="extcatlabel_{$cat_arr[cat_entry].cat_id}">{$cat_arr[cat_entry].cat_desc}</div>
						<div id="lblcategory_{$cat_arr[cat_entry].cat_id}" title="Rename Category" style="display: none;">
							<input type="text" name="txtCatlabel_{$cat_arr[cat_entry].cat_id}" id="txtCatlabel_{$cat_arr[cat_entry].cat_id}" value="{$cat_arr[cat_entry].cat_desc}" style="height: 25px;" />
							<!--<input type="button" name="btnUpdateCat_{$cat_arr[cat_entry].cat_id}" id="btnUpdateCat_{$cat_arr[cat_entry].cat_id}" value="rename" onclick="" />-->
							<div style="float: right; margin: 5px 30px 0 0;">
							<a href="javascript: void(0);" onclick="updateCatLabel('{$cat_arr[cat_entry].cat_id}')"><img src="images/icons/icon_update.png" /></a></div>
						</div>
					</td>
					<td><a href="javascript: void(0);" onclick="renameCategory('{$cat_arr[cat_entry].cat_id}')"><img src="images/icons/edit.gif" width="15" height="15" alt="rename category" title="rename category" /></a></td>
					<td align="center">{$cat_arr[cat_entry].parent_id}</td>
					<td align="center">{$cat_arr[cat_entry].status}</td>
                                         <td align="center"><a  href="javascript: void(0);" onclick="deletecategory({$cat_arr[cat_entry].cat_id});"><img src="images/icons/a-minus.gif" /></a></td>
				</tr>
				{/section}								
		  </table></td>
		<td width="2%">&nbsp;</td>
		<td width="38%" rowspan="2" valign="top"><table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
          <tr>
            <th colspan="2" align="left" class="table-header-repeat line-left"><img src="images/icons/add.png" />Add New</th>
          </tr>
          <tr>
            <td>Category Label</td>
            <td><input type="text" name="txtCat" id="txtCat" value="" /></td>
          </tr>
          <tr>
            <td>Parent Category</td>
            <td><select name="cmbParentCat" id="cmbParentCat">
            	<option value="0">Parent Category</option>  
            	{section name=parent_cat_entry loop=$parent_cat_arr}	  					
            	<option value="{$parent_cat_arr[parent_cat_entry].cat_id}">{$parent_cat_arr[parent_cat_entry].cat_desc}</option>              
              	{/section}
            </select>
            </td>
          </tr>
          <tr>
            <td>Status</td>
            <td><select name="cmbStatus" id="cmbStatus">
                <option value="#">Select Status</option>
                <option value="1">Show</option>
                <option value="0">Hide</option>
              </select>
            </td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td><div class="edit-icoset"><a href="javascript: void(0);" onclick="saveCategory();"><img src="images/icons/save-2.gif" />Save</a></td>
          </tr>
        </table></td>
	</tr>
	<tr>
	  <td>&nbsp;</td>
  </tr>
</table>
